package prime_numbers;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class prime_numbers {
	
	void generatePrimes(int input) {

		for (int i = 2; i <= input; i++) {

			int p = 0;
			int sq_rt = (int) Math.sqrt(i);
			// System.out.println(i);
			for (int j = 2; j <= sq_rt + 1; j++) {

				if (i == 2) {

				} else if (i % j == 0) {

					p = 1;
					break;
				}
				// System.out.println("i ::"+i+" j ::"+j);
			}

			if (p == 0) {

				System.out.println("i ::" + i);
			}

		}

	}

}
